home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 January / macformat-033.iso / mac / Shareware City / Comms / Tricks Folder / Teaching / scripts / hello-world-03.script < prev    next >
Encoding:
Text File  |  1995-08-14  |  1003 b   |  32 lines  |  [TEXT/ToyS]

  1. -- define the standard HTTP header
  2. set LF to ASCII character (10)
  3. set CR to return
  4. set CRLF to CR & LF
  5. set http_10_header to "HTTP/1.0 200 OK" & CRLF & ¬
  6.     "Server: MacHTTP" & CRLF & ¬
  7.     "MIME-Version: 1.0" & CRLF & ¬
  8.     "Content-type: text/html" & CRLF & CRLF
  9.  
  10. -- return the results, including the prepended variables, as an HTML file
  11. return http_10_header & ¬
  12.     "<html>" & ¬
  13.     "<head>" & ¬
  14.     "<title>Hello, World</title>" & ¬
  15.     "</head>" & ¬
  16.     "<body>Hello, World!" & ¬
  17.     "<p>http_search_args: " & http_search_args & ¬
  18.     "<br>path_args: " & path_args & ¬
  19.     "<br>post_args: " & post_args & ¬
  20.     "<br>method: " & method & ¬
  21.     "<br>client_address: " & client_address & ¬
  22.     "<br>username:" & username & ¬
  23.     "<br>password: " & password & ¬
  24.     "<br>from_user:" & from_user & ¬
  25.     "<br>server_name:" & server_name & ¬
  26.     "<br>server_port:" & server_port & ¬
  27.     "<br>script_name: " & script_name & ¬
  28.     "<br>content_type: " & content_type & ¬
  29.     "<br>referer: " & referer & ¬
  30.     "<br>user_agent: " & user_agent & ¬
  31.     "</body>" & ¬
  32.     "</html>"